import {createStore, compose, applyMiddleware} from 'redux'
import reducer from './reducer.js'
import thunk from 'redux-thunk'

const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
const store = createStore(reducer, composeEnhancers(
    applyMiddleware(thunk) // 使用异步thunk中间件，那么action久可以异步使用函数
));

export default store;